<?php slot('feedbackWidget') ?>
<?php use_stylesheet('/enermaatik/arveldus.css') ?>
<div id="newslbox">
  <div id="newslboxtitle"><?php echo __('Uudiskiri') ?></div>
  <div class="aformcontent" style="width:100px;float:left;margin-top:15px;">
    <div class="formleft"><img width="10" height="30" src="/enermaatik/img/formleft.png" alt=""></div>
    <div class="formcenter">
            <input style="width:70px;" type="text" id="nlemail" class="ainput" name="email">
    </div>
    <div class="formright"><img width="10" height="30" src="/enermaatik/img/formright.png" alt=""></div>
    <div class="clear"></div>
  </div>
    <div style="margin-top: 16px; float:left;" class="">
      <div class="hallbuttonleft"><img width="8" height="26" src="/enermaatik/img/tbl.png" alt=""></div>
      <div id="newsletterSubmit" class="hallbuttoncenter">
              <p><a href="#"><?php echo __('Liitu')?></a></p>
      </div>
      <div class="hallbuttonright"><img width="8" height="26" src="/enermaatik/img/tbr.png" alt=""></div>
      <div class="clear"></div>

    </div>
    <div class="clear"></div>
</div>
<div id="feedback">
  <?php foreach($banners as $banner):?>
  <a href="/est/tagasiside"><img src="<?php echo '/uploads'.$banner['file'] ?>" /></a>
  <?php endforeach;?>
</div>

<script type="text/javascript">
  $('#newsletterSubmit').click(function() 
  {
    if ($('nlemail').val() != '')
    {
      $.post('<?php echo LinkGen::getInstance(LinkGen::RAW_ACTION)->link(null, array_merge(
              array('module' => 'feedbackWidget', 'action' => 'joinNewsletter'))) ?>', {email : $('#nlemail').val()}, function(data) {
                  $('#newslboxtitle').html(data);
              });
    }
    return false;
  });
</script>

<?php end_slot() ?>